import request from "@/utils/request";

// 查询工程项目信息-合同信息列表
export function listProjectContractInfo(query) {
  return request({
    url: "/production/projectContractInfo/list",
    method: "get",
    params: query,
  });
}

// 查询工程项目信息根据用户
export function listProjectByUser(query) {
  return request({
    url: "/production/projectContractInfo/listByUser",
    method: "get",
    params: query,
  });
}

// 查询工程项目信息-合同信息所有列表
export function listAllProjectContractInfo(query) {
  return request({
    // url: "/production/projectContractInfo/listAll",
    url: "/production/projectContractInfo/listByUser", //查询工程项目信息根据用户
    method: "get",
    params: query,
  });
}

// 查询工程项目信息-合同信息详细
export function getProjectContractInfo(id) {
  return request({
    url: "/production/projectContractInfo/getInfo/" + id,
    method: "get",
  });
}

// 新增工程项目信息-合同信息
export function addProjectContractInfo(data) {
  return request({
    url: "/production/projectContractInfo/add",
    method: "post",
    data: data,
  });
}

// 修改工程项目信息-合同信息
export function updateProjectContractInfo(data) {
  return request({
    url: "/production/projectContractInfo/edit",
    method: "post",
    data: data,
  });
}

// 删除工程项目信息-合同信息
export function delProjectContractInfo(id) {
  return request({
    url: "/production/projectContractInfo/remove/" + id,
    method: "get",
  });
}

// 项目分配人员
export function addPerson(params) {
  return request({
    url: "/production/projectMember/addByUsers",
    method: "post",
    params: params,
  });
}
